home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Freeware 2002 November
/
SGI Freeware 2002 November - Disc 3.iso
/
dist
/
fw_stylesheets.idb
/
usr
/
freeware
/
bin
/
db2pdf.z
/
db2pdf
Wrap
Text File
|
2000-07-20
|
898b
|
53 lines
#! /bin/sh
DB_STYLESHEET=${ROOT}/usr/freeware/lib/sgml/stylesheets/cygnus-both.dsl
TMPFN=`echo $1 | sed 's/\.sgml//'`
# Dave Mason's option to specify a different stylesheet
case $1 in
-d) DB_STYLESHEET=$2
shift 2
;;
esac
echo "Using stylesheet: \"${DB_STYLESHEET}\""
if [ $# -gt 2 ]
then
echo "Usage: `basename $0` [filename.sgml]" >&2
exit 1
fi
if [ $# -eq 1 ]
then
if [ ! -r $1 ]
then
echo Cannot read \"$1\". Exiting. >&2
exit 1
fi
if echo $1 | egrep -i '\.sgml$|\.sgm$' >/dev/null 2>&1
then
output="`echo $1 | sed 's,\.sgml$,.pdf,;s,\.sgm$,.pdf,'`"
fi
fi
jade -t tex -d ${DB_STYLESHEET}\#print -o ${TMPFN}.tex $1
pdfjadetex $TMPFN
if egrep '^LaTeX Warning: There were undefined references.$' ${TMPFN}.log >/dev/null 2>&1
then
pdfjadetex $TMPFN
pdfjadetex $TMPFN
fi
#if [ -f ${TMPFN}.cfg ]
#then
# mv ${TMPFN}.cfg jade.cfg
#fi
exit 0